package cn.gcBlock.rest;

import cn.gcBlock.dto.NodeDTO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.ResponseEntity;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;


/**
 * @Author：dapan
 * @Description:cadota
 * @Date:Create in 17:39 2018/5/5
 * @Modifird By:
 */
@Api(tags = "区块帮助模块（注册钱包，验证签名）")
@FeignClient(name = "RestBlockHelpService",
        url = "${rpc.block.url}"
)
public interface RestBlockHelpService {

    @ApiOperation(value = "生成签名单")
    @PostMapping(name = "生成签名单", value = "/sign")
    ResponseEntity<NodeDTO> getDetail(@RequestBody NodeDTO resource);

    @ApiOperation(value = "生成签名单并发送")
    @PostMapping(name = "生成签名单并发送", value = "/" +
            "")
    ResponseEntity<NodeDTO> signPost(@RequestBody NodeDTO resource);


    @ApiOperation(value = "生成钱包地址")
    @GetMapping(name = "生成钱包地址", value = "/register/address")
    ResponseEntity address(@RequestParam String symbol);


    @ApiOperation(value = "创建")
    @PostMapping(value = "/create")
    ResponseEntity create(@Validated @RequestBody NodeDTO resource);

}
